@use 'sass:map';

@forward 'element-plus/theme-chalk/src/common/var.scss' with (
  $colors: (
    'primary': (
      'base': #5bc0c3
    )
  ),
  $input: (
    'border-radius': 8px,
    'border-color': #f3f3f3,
    'hover-border-color': #f3f3f3,
    'bg-color': #f3f3f3,
    'icon-color': #668493,
    'checked-bg-color': #64c3c8,
    'transparent-border': 0 0 0 1px #668493 inset,
    'focus-border-color': #668493,
    'placeholder-color': #668493,
    'text-color': #00324b
  ),
  $input-disabled: (
    'fill': #ccd6db,
    'text-color': #00324b,
    'placeholder-color': #00324b
  ),
  $checkbox: (
    'border-radius': 4px,
    'font-size': 14px,
    'input-width': 22px,
    'input-height': 22px,
    'text-color': #335b6f,
    'checked-text-color': #335b6f
  ),
  $radio: (
    'input-width': 22px,
    'input-height': 22px,
    'input-border-color': #64c3c8,
    'text-color': #335b6f,
    'checked-text-color': #335b6f
  ),
  $radio-checked: (
    'text-color': #335b6f
  ),
  $select-option: (
    'hover-background': #e8f6f7,
    'text-color': #325b6f,
    'selected-text-color': #009b91
  ),
  $datepicker: (
    'header-text-color': #00324b,
    'text-color': #00324b
  ),
  $messagebox: (
    'width': 400px
  )
);

:root {
  --el-border-color: #ccd6db;
  --el-border-radius-base: 6px;
  --el-disabled-border-color: #ccd6db;
  --el-disabled-bg-color: #ccd6db;
  --el-text-color-placeholder: #335b6f;
}

// 下拉框
.el-select {
  --el-select-input-color: #668493;
  --el-select-border-color-hover: #f3f3f3;
  --el-select-input-focus-border-color: #668493;
  &-dropdown__item {
    &.hover {
      color: #009b91;
    }
    &.selected {
      background: #e8f6f7;
      font-weight: initial;
    }
  }
}

// 级联选择
.el-cascader {
  &-menu {
    --el-cascader-node-background-hover: #e8f6f7;
  }
  &-node {
    &__prefix,
    &__postfix {
      position: absolute !important;
    }
    &.in-active-path,
    &.is-active {
      background: #e8f6f7;
      font-weight: initial;
    }
  }
}

// 单选框
.el-radio {
  &__inner {
    &::after {
      width: 8px;
      height: 8px;
    }
  }
  &__input.is-disabled.is-checked &__inner::after {
    background-color: #fff;
  }
}

// 复选框
.el-checkbox {
  --el-checkbox-disabled-input-fill: #ccd6db;
  --el-checkbox-disabled-checked-input-fill: #ccd6db;
  --el-checkbox-disabled-checked-icon-color: #fff;
  &__inner {
    &::after {
      height: 14px;
      width: 6px;
      top: -0.5px;
      left: 6px;
      border-width: 2px;
    }
  }
  &__input {
    &.is-indeterminate {
      .el-checkbox__inner {
        &::before {
          height: 6px;
          top: 6px;
        }
      }
    }
  }
}

// 日期选择器
.el-date-editor {
  display: inline-flex;
  --el-text-color-regular: #00324b;
  --el-input-bg-color: #f3f3f3;
  --el-input-border-color: #f3f3f3;
  --el-input-hover-border-color: #f3f3f3;
  --el-input-focus-border-color: #00324b;
}
